package com.example.demo.model.service;

import com.example.demo.model.mapper.OperateRecordMapper;
import com.example.demo.model.valueObject.OperateRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class OperateRecordService {
    @Autowired
    private OperateRecordMapper operateRecordMapper;
    //根据id获取操作记录
    public List<OperateRecord> getOperateRecordById(String id)
    {
        return operateRecordMapper.getOperateRecordById(id);
    }
    //插入一条记录
    public void insertAnOperateRecord(OperateRecord operateRecord)
    {
        operateRecordMapper.insertAnOperateRecord(operateRecord);
    }
    //获取今日所有的操作记录
    public List<OperateRecord> getWeekOperateRecord()
    {
        return operateRecordMapper.getWeekOperateRecord();
    }
    //获取所有的操作记录
    public List<OperateRecord> getAllOperateRecord()
    {
        return operateRecordMapper.getAllOperateRecord();
    }
}
